import React, { Component } from "react";
import LinkButton from "../../../components/link-button";
import { Table } from "antd";
class database extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    const dataSource = [
      {
        key: "1",
        name: "ALL_DB",
        sum: 2391,
        sos: 1950,
        tall: 3111,
        in: 10181,
        low: 1650,
        message: 0,
        desc: "4",
        handle: "查看",
      },
      {
        key: "2",
        name: "Oracle",
        sum: 855,
        sos: 67,
        tall: 254,
        in: 331,
        low: 103,
        message: 100,
        desc: "1",
        handle: "查看",
      },
      {
        key: "3",
        name: "SQL",
        sum: 223,
        sos: 20,
        tall: 114,
        in: 36,
        low: 5,
        message: 48,
        desc: "2",
        handle: "查看",
      },
    ];

    const columns = [
      {
        title: "策略组名称",
        dataIndex: "name",
        key: "name",
      },
      {
        title: "策略总数",
        dataIndex: "sum",
        key: "sum",
      },
      {
        title: "紧急",
        dataIndex: "sos",
        key: "sos",
      },
      {
        title: "高",
        dataIndex: "tall",
        key: "tall",
      },
      {
        title: "中",
        dataIndex: "in",
        key: "in",
      },
      {
        title: "低",
        dataIndex: "low",
        key: "low",
      },
      {
        title: "信息",
        dataIndex: "message",
        key: "message",
      },
      {
        title: "描述",
        dataIndex: "desc",
        key: "desc",
      },
      {
        title: "操作",
        dataIndex: "handle",
        key: "handle",
        render: (text) => <LinkButton>{text}</LinkButton>,
      },
    ];
    return (
      <>
        <Table dataSource={dataSource} columns={columns} />
      </>
    );
  }
}

export default database;
